package model;

import java.util.ArrayList;

//CardSet: Player Hand + Hand ng Dealer
public class CardSet {
	private final Player player;
	private String ranking;
	private ArrayList<Card> cardSet;
	private Card highCard;
	private int value;
	private boolean isWinner = false;
	
	public CardSet(Player player) {
		this.player = player;
		this.cardSet = new ArrayList<Card>();
		this.ranking = null;
		this.highCard = null;
		this.value = 0;
		this.isWinner = false;
		
	}
	
	//Getters
	public ArrayList<Card> getCardSet() {
		return cardSet;
	}
	
	public Card getHighCard() {
		return highCard;
	}

	public Player getPlayer() {
		return player;
	}

	public String getRanking() {
		return ranking;
	}
	
	public int getValue() {
		return value;
	}
	
	public boolean isWinner() {
		return isWinner;
	}
	
	//Setters
	public void setCardSet(ArrayList<Card> cardSet) {
		this.cardSet = cardSet;
	}

	public void setHighCard(Card highCard) {
		this.highCard = highCard;
	}
	
	public void setRanking(String ranking) {
		this.ranking = ranking;
	}
	
	public void setValue(int value) {
		this.value = value;
	}
	
	//Other Methods
	public void addToCardSet(Card card) {
		this.cardSet.add(card);
	}
	
	public void addToCardSet(ArrayList<Card> playerCards, ArrayList<Card> tableCards) {
		this.addToCardSet(playerCards);
		this.addToCardSet(tableCards);
	}
	
	public void addToCardSet(ArrayList<Card> cards) {
		for(Card card : cards)
			this.cardSet.add(card);
	}

	public void setWinner(boolean isWinner) {
		this.isWinner = isWinner;
	}
	
}
